<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>添加 - easyui</title>
		<%@ include file="/common/include/title.jsp"%>
		<script type="text/javascript">
			<!-- 提交数据  -->
			function dataSubmit()
			{
				$("#form").form('submit',
				{
					onSubmit:function()
					{
						var flag = $(this).form('enableValidation').form('validate') ; 
						return flag;
					},
					success:function(data)
					{
						/* alert('--success---' + data); */
						/* 提示 
							easy-ui:alert
						*/
						/*
							将字符串变成JSON
						*/
						data = JSON.parse(data);
						$.messager.alert("成功!!",data.info);
						/* alert('--success---' + data.info); */
					}
				});
				return false ; 
			}
		</script>
	</head>
	<body>
		<!-- 弹出的对话框 -->
		<div id="dataDialog" class="easyui-panel" title="对话框" 
			data-options="iconCls:'icon-save'">
			<form id="form" action="${rootPath }/back/goods/brandInsertSubmit.htm"
			 method="post"  enctype="multipart/form-data">
				<table>
					<tr>
						<td>
							名称:
						</td>
						<td>
							<input type="text" name="name" class="easyui-textbox" placeholder="名称" data-options="required:true"/>
						</td>
					</tr>
					<tr>
						<td>网址:</td>
						<td>
							<input type="text" name="website" class="easyui-textbox" placeholder="网址"/>
						</td>
					</tr>
					<tr>
						<td>LOGO:</td>
						<td>
							<input type="file" name="file" />
						</td>
					</tr>
					<tr>
						<td>发布时间:</td>
						<td>
							<input type="text" name="pubtimeStr"
							value="<fmt:formatDate value="${sys_now}" pattern="yyyy-MM-dd HH:mm:ss"/>" 
							class="easyui-datetimebox" placeholder="发布时间"/>
						</td>
					</tr>
					<tr>
						<td>状态:</td>
						<td>
							<input type="radio" name="status" value="1" id="status1" checked="checked"/>
							<label for="status1">启用</label>
							<input type="radio" name="status" value="0" id="status0"/>
							<label for="status0">禁用</label>
						</td>
					</tr>
					
					<tr>
						<td>内容:</td>
						<td>
							<textarea rows="5" cols="50" name="content"></textarea>
						</td>
					</tr>
					
					<tr>
						<td colspan="2">
							<a href="#" class="easyui-linkbutton" onclick="return dataSubmit()">提交</a>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>